﻿<%@ page import="com.ws.q1.conifg.Res" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>Document</title>
	<link rel="stylesheet" href="${pageContext.request.contextPath}/css/bootstrap.min.css">
	<script src="${pageContext.request.contextPath}/js/jquery-2.1.0.min.js"></script>
	<script src="${pageContext.request.contextPath}/js/bootstrap.min.js"></script>
	<style>
		.panel {
			margin-bottom: 0px;
		}
		.panel-body {
			background-color: #337ab7;
			color: #fff;
		}
		.panel-body a {
			color: #fff;
			font-size: 20px;
		}
		.aside {
			width: 300px;
			border: 1px solid #ccc;
			height: 700px;
		}
		.menu .panel-heading {
			background-color: #337ab7;
			color: #fff;
			cursor: pointer;
		}
		.menu .list-group {
			display: none;
		}
		.aside {
			float: left;
			width: 15%;
		}
		.right {
			float: left;
			width: 85%;
			height: 700px;
		}
		.user-info {
			float: right;
		}
		.user-info a {
			margin-left: 15px;
			font-size: 14px;
		}
		.user-info a:hover {
			text-decoration: underline;
		}
		.glyphicon {
			margin-right: 8px;
		}
	</style>
</head>
<body>
<div>
	<div class="top">
		<div class="panel panel-default panel-custom">
			<div class="panel-body">
				<a href="">
					<span>六月旅行线路管理系统</span>
				</a>
				<div class="user-info">
					<img src="<%=Res.fileUrl%>${user.tou}" alt="用户头像" style="width: 50px; height: 50px; border-radius: 50px;">
					<a href="#"><span class="glyphicon glyphicon-user"></span>欢迎：${user.name}</a>
					<a href="${pageContext.request.contextPath}/houtai/login"><span class="glyphicon glyphicon-off"></span>退出</a>
				</div>
			</div>
		</div>
	</div>
	<div class="content">
		<div class="aside">
			<div class="menu">
				<div class="panel panel-default">
					<!-- Default panel contents -->
					<div class="panel-heading">
						<span>权限管理</span>
					</div>
					<!-- List group -->
					<ul class="list-group">
						<li class="list-group-item">
							<a href="${pageContext.request.contextPath}/houtaiuser/list" target="myFrame">前台用户管理</a>
						</li>
						<li class="list-group-item">
							<a href="${pageContext.request.contextPath}/denglu/list" target="myFrame">后台用户管理</a>
						</li>
						<li class="list-group-item">
							<a href="${pageContext.request.contextPath}/user/role" target="myFrame">角色管理</a>
						</li>
						<li class="list-group-item">
							<a href="${pageContext.request.contextPath}/menu/list" target="myFrame">菜单管理</a>
						</li>
						<li class="list-group-item">
							<a href="${pageContext.request.contextPath}/role/add" target="myFrame">角色管理</a>
						</li>
						<li class="list-group-item">
							<a href="${pageContext.request.contextPath}/role/list" target="myFrame">角色管理</a>
						</li>
						<li class="list-group-item">
							<a href="${pageContext.request.contextPath}/role/menu-list" target="myFrame">菜单管理</a>
						</li>
					</ul>
				</div>
			</div>

			<div class="menu">
				<div class="panel panel-default">
					<!-- Default panel contents -->
					<div class="panel-heading">
						<span>线路管理</span>
					</div>
					<!-- List group -->
					<ul class="list-group">
<%--						<li class="list-group-item">--%>
<%--							<a href="${pageContext.request.contextPath}/xianlu/add" target="myFrame">增加</a>--%>
<%--						</li>--%>
<%--						<li class="list-group-item">--%>
<%--							<a href="${pageContext.request.contextPath}/xianlu/update" target="myFrame">修改</a>--%>
<%--						</li>--%>
<%--						<li class="list-group-item">--%>
<%--							<a href="${pageContext.request.contextPath}/xianlu/delete" target="myFrame">删除</a>--%>
<%--						</li>--%>
						<li class="list-group-item">
							<a href="${pageContext.request.contextPath}/xianlu/list" target="myFrame">查看</a>
						</li>
					</ul>
				</div>
			</div>

			<div class="menu">
				<div class="panel panel-default">
					<!-- Default panel contents -->
					<div class="panel-heading">
						<span>轮播管理</span>
					</div>
					<!-- List group -->
					<ul class="list-group">
						<li class="list-group-item">
							<a href="${pageContext.request.contextPath}/lunbo/add" target="myFrame">增加</a>
						</li>
						<li class="list-group-item">
							<a href="${pageContext.request.contextPath}/lunbo/edit" target="myFrame">修改</a>
						</li>
						<li class="list-group-item">
							<a href="${pageContext.request.contextPath}/lunbo/delete" target="myFrame">删除</a>
						</li>
						<li class="list-group-item">
							<a href="${pageContext.request.contextPath}/lunbo/view" target="myFrame">查看</a>
						</li>
					</ul>
				</div>
			</div>

			<div class="menu">
				<div class="panel panel-default">
					<!-- Default panel contents -->
					<div class="panel-heading">
						<span>供应商管理</span>
					</div>
					<!-- List group -->
					<ul class="list-group">
<%--						<li class="list-group-item">--%>
<%--							<a href="${pageContext.request.contextPath}/shang/tiao" target="myFrame">增加</a>--%>
<%--						</li>--%>
<%--						<li class="list-group-item">--%>
<%--							<a href="${pageContext.request.contextPath}/gongyingshang/edit" target="myFrame">修改</a>--%>
<%--						</li>--%>
<%--						<li class="list-group-item">--%>
<%--							<a href="${pageContext.request.contextPath}/shang/delete" target="myFrame">删除</a>--%>
<%--						</li>--%>
						<li class="list-group-item">
							<a href="${pageContext.request.contextPath}/shang/list" target="myFrame">查看</a>
						</li>
					</ul>
				</div>
			</div>

			<div class="menu">
				<div class="panel panel-default">
					<!-- Default panel contents -->
					<div class="panel-heading">
						<span>栏目管理</span>
					</div>
					<!-- List group -->
					<ul class="list-group">
<%--						<li class="list-group-item">--%>
<%--							<a href="${pageContext.request.contextPath}/lanmu/tiaozhuan" target="myFrame">增加</a>--%>
<%--						</li>--%>
<%--						<li class="list-group-item">--%>
<%--							<a href="${pageContext.request.contextPath}/lanmu/update" target="myFrame">修改</a>--%>
<%--						</li>--%>
<%--						<li class="list-group-item">--%>
<%--							<a href="${pageContext.request.contextPath}/lanmu/delete" target="myFrame">删除</a>--%>
<%--						</li>--%>
						<li class="list-group-item">
							<a href="${pageContext.request.contextPath}/lanmu/list" target="myFrame">查看</a>
						</li>
					</ul>
				</div>
			</div>

			<div class="menu">
				<div class="panel panel-default">
					<!-- Default panel contents -->
					<div class="panel-heading">
						<span>收藏管理</span>
					</div>
					<!-- List group -->
					<ul class="list-group">
						<li class="list-group-item">
							<a href="${pageContext.request.contextPath}/shoucang/add" target="myFrame">增加</a>
						</li>
						<li class="list-group-item">
							<a href="${pageContext.request.contextPath}/shoucang/edit" target="myFrame">修改</a>
						</li>
						<li class="list-group-item">
							<a href="${pageContext.request.contextPath}/shoucang/delete" target="myFrame">删除</a>
						</li>
						<li class="list-group-item">
							<a href="${pageContext.request.contextPath}/shoucang/view" target="myFrame">查看</a>
						</li>
					</ul>
				</div>
			</div>

			<div class="menu">
				<div class="panel panel-default">
					<!-- Default panel contents -->
					<div class="panel-heading">
						<span>友情链接管理</span>
					</div>
					<!-- List group -->
					<ul class="list-group">
<%--						<li class="list-group-item">--%>
<%--							<a href="${pageContext.request.contextPath}/you/tiao" target="myFrame">增加</a>--%>
<%--						</li>--%>
<%--						<li class="list-group-item">--%>
<%--							<a href="${pageContext.request.contextPath}/you/update" target="myFrame">修改</a>--%>
<%--						</li>--%>
<%--						<li class="list-group-item">--%>
<%--							<a href="${pageContext.request.contextPath}/you/delete" target="myFrame">删除</a>--%>
<%--						</li>--%>
						<li class="list-group-item">
							<a href="${pageContext.request.contextPath}/you/list" target="myFrame">查看</a>
						</li>
					</ul>
				</div>
			</div>
		</div>

		<div class="right">
			<iframe name="myFrame" width="100%" height="100%" scrolling="yes" frameborder="0" src="${pageContext.request.contextPath}/houtai/welcome"></iframe>
		</div>
	</div>
	<div class="footer"></div>
</div>
<script>
	document.addEventListener('DOMContentLoaded', function() {
		var menus = document.querySelectorAll(".menu .panel-heading");

		menus.forEach(function(element) {
			element.addEventListener('click', function() {
				var listGroup = this.nextElementSibling;
				if (listGroup.style.display === "block") {
					listGroup.style.display = "none";
				} else {
					listGroup.style.display = "block";
				}
			});
		});
	});
</script>
</body>
</html>
